// JavaScript Document
$(document).ready(function (e) {
	movetitle();
	//setInterval(movetitle,5000);
});

window.onscroll=function(){
	var top = document.body.scrollTop||document.documentElement.scrollTop;
	if(top>400){
		$(".left").css({"position":"fixed","left":"10%","top":"0px","width":"16%"});
	}else{
		$(".left").css({"position":"static","width":"20%"});
	}
}

function movetitle(){
	$("#title1").animate({"left":"10px","top":"2px"},3000,function(){
		$("#title1").animate({"left":"0px","top":"0px"},3000);
	});
	$("#title2").animate({"left":"20px","top":"3px"},3000,function(){
		$("#title2").animate({"left":"0px","top":"0px"},3000,function(){
			movetitle();
		});
	});
}